package parser;

import java.io.StringWriter;
import java.util.ArrayList;
import java.util.List;

import org.jrubyparser.NodeVisitor;
import org.jrubyparser.ast.*;
import org.jrubyparser.rewriter.ReWriteVisitor;

public class StatementVisitor implements NodeVisitor {

	Storage storage = Storage.getInstance();
	private static ControlFlowGraph cfg;
	private static CFGNode cfgNode;
	private static String className, methodName, fileName;
	private static List<Method> methods;
	private static Method method;
	private static String key, mvc, code, type;
	
	public void visit(Node node)
	{
		StatementVisitor visitor = new StatementVisitor();
		node.accept(visitor);
	}
	
	public String toCode(Node astNode)
	{
		String code="";
		try{
			StringWriter writer = new StringWriter();
			ReWriteVisitor reVisitor = new ReWriteVisitor(writer, "");
			astNode.accept(reVisitor);
			code = writer.toString();
		}catch(StringIndexOutOfBoundsException siobe){
	        System.out.println("invalid input" );
	        siobe.printStackTrace();
	    }
		
		return code;
	}
	
	public void setKey(String keys) {
		String[] tempMvc=keys.split(";");
		fileName=tempMvc[0];
		mvc=tempMvc[1];
		key = keys;
	}
	
	/*public void setEdge(CFGNode node)
	{
		CFGNode last = cfg.getLastNode();
		if(cfg.getGraphNodes().size()==1)
		{
			node.addComingNodes(last);
			last.addOutgoingNodes(node);
		}
		else if(cfg.getGraphNodes().size()>2)
		{
			if(control.equals("case"))
			{
				if(type.equals("case"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
				else if(type.equals(""))
				{
					
				}
			}
			else if(control.equals("for"))
			{
				if(type.equals("for"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
			}
			else if(control.equals("if"))
			{
				if(type.equals("if"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
			}
			else if(control.equals("until"))
			{
				if(type.equals("until"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
			}
			else if(control.equals("while"))
			{
				if(type.equals("while"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
			}
			else
			{
				
			}
		}
	}*/
	
	public void setIncomingNodes(CFGNode node)
	{
		CFGNode last=new CFGNode();
		last=cfg.getLastNode();
		if(cfg.getGraphNodes().size()==1)
		{
			node.addComingNodes(last);
			last.addOutgoingNodes(node);
		}
		else if(cfg.getGraphNodes().size()>=2)
		{
			if(type=="case"||type=="for"||type=="if"||type=="until"||type=="while")
			{
				node.addComingNodes(last);
				last.addOutgoingNodes(node);
			}
			else if(last.getType().equals("bodywhile")||last.getType().equals("bodyfor")||last.getType().equals("bodyuntil"))
			{
				if(node.getType().equals("statement"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
				if(!node.getType().equals("bodywhile")||!node.getType().equals("bodyfor")||!node.getType().equals("bodyuntil"))
				{
					for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
					{
						if(cfg.getGraphNodes().get(i).getType().equals("while"))
						{
							last.addOutgoingNodes(cfg.getGraphNodes().get(i));
							cfg.getGraphNodes().get(i).addComingNodes(last);
							break;
						}
						else if(cfg.getGraphNodes().get(i).getType().equals("for"))
						{
							last.addOutgoingNodes(cfg.getGraphNodes().get(i));
							cfg.getGraphNodes().get(i).addComingNodes(last);
							break;
						}
						else if(cfg.getGraphNodes().get(i).getType().equals("until"))
						{
							last.addOutgoingNodes(cfg.getGraphNodes().get(i));
							cfg.getGraphNodes().get(i).addComingNodes(last);
							break;
						}
						else if(node.getType().equals("exit"))
						{
							last.addOutgoingNodes(node);
							node.addComingNodes(last);
						}
					}
				}
			}
			else if(type=="when"||type=="elsecase")
			{
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("case"))
					{
						node.addComingNodes(cfg.getGraphNodes().get(i));
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
					}
				}
			}
			else if(type=="then"||type=="else")
			{
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("if"))
					{
						node.addComingNodes(cfg.getGraphNodes().get(i));
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
					}
				}
			}
			else if(type=="bodyfor"||type=="bodywhile"||type=="bodyuntil")
			{
				if(last.getType().equals("for")||last.getType().equals("while")||last.getType().equals("until"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
				else
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
				
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("if") && cfg.getGraphNodes().get(i).getOutgoingNodes().size()==1
							&& !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("else"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
					else if(cfg.getGraphNodes().get(i).getType().equals("case") && !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("elsecase"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
					else
					{
						node.addComingNodes(last);
						last.addOutgoingNodes(node);
					}
				}
			}
			else if(node.getCode().contains("redo"))
			{
				if(last.getType().equals("bodywhile")||last.getType().equals("bodyfor")||last.getType().equals("bodyuntil"))
				{
					last.addOutgoingNodes(node);
					node.addComingNodes(last);
					node.addOutgoingNodes(last);
				}
			}
			else if(node.getCode().contains("retry"))
			{
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("while")||cfg.getGraphNodes().get(i).getType().equals("for")||
							cfg.getGraphNodes().get(i).getType().equals("if")||cfg.getGraphNodes().get(i).getType().equals("case"))
					{
						node.addOutgoingNodes(cfg.getGraphNodes().get(i));
					}
				}
			}
			else if(type=="statement")
			{
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("while")||cfg.getGraphNodes().get(i).getType().equals("for"))
					{
						if(cfg.getGraphNodes().get(i).getType().equals("if") && cfg.getGraphNodes().get(i).getOutgoingNodes().size()==1
								&& !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("else"))
						{
							cfg.getGraphNodes().get(i).addOutgoingNodes(node);
							node.addComingNodes(cfg.getGraphNodes().get(i));
						}
					}
				}
			}
			else if(type=="exit")
			{
				int size = cfg.getGraphNodes().size();
				if(last.getType().equals("statement")||last.getCode().contains("return")||last.getCode().contains("break"))
				{
					node.addComingNodes(last);
					last.addOutgoingNodes(node);
				}
				for(int i=size-1; i>0;i--)
				{
					for(CFGNode n:cfg.getGraphNodes().get(i-1).getComingNodes())
					{
						if(cfg.getGraphNodes().get(i).getComingNodes().contains(n.getComingNodes())&&cfg.getGraphNodes().get(i).getOutgoingNodes()==null)
						{
							node.addComingNodes(cfg.getGraphNodes().get(i));
							node.addComingNodes(cfg.getGraphNodes().get(i-1));
	
							cfg.getGraphNodes().get(i).addOutgoingNodes(node);
							break;
						}
					}
					if(cfg.getGraphNodes().get(i).getType().equals("if") && cfg.getGraphNodes().get(i).getOutgoingNodes().size()==1
							&& !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("else"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
					if(cfg.getGraphNodes().get(i).getCode().contains("next"))
					{
						if(cfg.getGraphNodes().get(i+1).getType().equals("exit"))
						{
							cfg.getGraphNodes().get(i+1).addOutgoingNodes(node);
							node.addComingNodes(cfg.getGraphNodes().get(i+1));
						}
						else if(cfg.getGraphNodes().get(i+1).getType().equals("bodywhile")||
								cfg.getGraphNodes().get(i+1).getType().equals("bodyfor")||
								cfg.getGraphNodes().get(i+1).getType().equals("bodyuntil"))
						{
							cfg.getGraphNodes().remove(cfg.getGraphNodes().get(i+1));
							cfg.getGraphNodes().get(i+1).addOutgoingNodes(node);
							node.addComingNodes(cfg.getGraphNodes().get(i+1));
						}
					}
				}
			}
			
			if(last.getType().equals("when") ||last.getType().equals("elsecase"))
			{
				boolean status=false;
				if(node.getType().equals("statement")||node.getType().equals("exit")||node.getType().equals("if")
						||node.getType().equals("for")||node.getType().equals("while")||node.getType().equals("until"))
				{
				for(int i=cfg.getGraphNodes().size()-1; i>0; i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("case"))
					{
						for(int a=cfg.getGraphNodes().get(i).getOutgoingNodes().size()-1; a>0; a--)
						{
							if(cfg.getGraphNodes().get(i).getOutgoingNodes().get(a).getType().equals("elsecase") && (last.getType().equals("when")||last.getType().equals("elsecase")))
							{
								status = true;
							}
						}
						if(status==false)
						{
							cfg.getGraphNodes().get(i).addOutgoingNodes(node);
							node.addComingNodes(cfg.getGraphNodes().get(i));
						}
					}
					if(cfg.getGraphNodes().get(i).getType().equals("when")||cfg.getGraphNodes().get(i).getType().equals("elsecase"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
				}
				}
			}
			if(last.getType().equals("then") ||last.getType().equals("else"))
			{
				boolean status=false;
				if(node.getType().equals("statement")||node.getType().equals("exit")||node.getType().equals("if")
						||node.getType().equals("for")||node.getType().equals("while")||node.getType().equals("until"))
				{
				for(int i=cfg.getGraphNodes().size()-1; i>0; i--)
				{
				if(cfg.getGraphNodes().get(i).getType().equals("if"))
				{
					for(int a=cfg.getGraphNodes().get(i).getOutgoingNodes().size()-1; a>0; a--)
					{
						if(cfg.getGraphNodes().get(i).getOutgoingNodes().get(a).getType().equals("else"))
						{
							status = true;
						}
					}
					if(status==false)
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
				}
				if(cfg.getGraphNodes().get(i).getType().equals("then")||cfg.getGraphNodes().get(i).getType().equals("else"))
				{
					cfg.getGraphNodes().get(i).addOutgoingNodes(node);
					node.addComingNodes(cfg.getGraphNodes().get(i));
				}
				}
				}
			}
			/*if(type=="bodywhile"||type == "bodyfor"||type=="bodyuntil"||type=="statement"||type=="exit")
			{
				for(int i=cfg.getGraphNodes().size()-1; i>0;i--)
				{
					if(cfg.getGraphNodes().get(i).getType().equals("if") && cfg.getGraphNodes().get(i).getOutgoingNodes().size()==1
							&& !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("else"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
					else if(cfg.getGraphNodes().get(i).getType().equals("case") && !cfg.getGraphNodes().get(i).getOutgoingNodes().contains("elsecase"))
					{
						cfg.getGraphNodes().get(i).addOutgoingNodes(node);
						node.addComingNodes(cfg.getGraphNodes().get(i));
					}
				}
			}*/
			
			
		}
		else
		{
			node.addComingNodes(last);
			last.addOutgoingNodes(node);
		}
	}

	
	@Override
	public Object visitAliasNode(AliasNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitAndNode(AndNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitArgsCatNode(ArgsCatNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitArgsNode(ArgsNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitArgsPushNode(ArgsPushNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitArgumentNode(ArgumentNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitArrayNode(ArrayNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitAttrAssignNode(AttrAssignNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBackRefNode(BackRefNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBeginNode(BeginNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBignumNode(BignumNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBlockArg18Node(BlockArg18Node arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBlockArgNode(BlockArgNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBlockNode(BlockNode arg0) {
		for(int i=0; i<arg0.size(); i++)
		{
			visit(arg0.get(i));
		}
		return true;
	}

	@Override
	public Object visitBlockPassNode(BlockPassNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitBreakNode(BreakNode arg0) {
		String adderCode;
		adderCode = toCode(arg0)+"\n";
		code+=adderCode;
		//type="break";
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitCallNode(CallNode arg0) {
		//System.out.print("Kelas "+className+"\nMethod: "+methodName+"\n"+"callNode: "+toCode(arg0)+"\n"+arg0.getLexicalName()+"\n"+toCode(arg0.getReceiver())+"\n"+toCode(arg0.getArgs())+"\n");
		return null;
	}

	@Override
	public Object visitCaseNode(CaseNode arg0) {

		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode = new CFGNode();
		type="case";
		/*String adderCode = toCode(arg0.getCase())+"\n";
		code+=adderCode;*/
		code = toCode(arg0.getCase());
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		if(arg0.getCases()!=null)
		{
			for(int i=0; i<arg0.getCases().size(); i++)
			{
				visit(arg0.getCases().get(i));
			}
			cfgNode = new CFGNode();
			code="";
		}
		if(arg0.getElse()!=null)
		{
			type="elsecase";
			cfgNode = new CFGNode();
			code="";
			visit(arg0.getElse());

			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);

			cfgNode = new CFGNode();
			type="statement";
			code="";
		}
		return true;
	}

	@Override
	public Object visitClassNode(ClassNode arg0) {
		className = arg0.getCPath().getLexicalName();
		methods = new ArrayList<Method>();
		
		if(arg0.getBody()!=null)
			visit(arg0.getBody());
		return null;
	}

	@Override
	public Object visitClassVarAsgnNode(ClassVarAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitClassVarDeclNode(ClassVarDeclNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitClassVarNode(ClassVarNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitColon2Node(Colon2Node arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitColon3Node(Colon3Node arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitCommentNode(CommentNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitConstDeclNode(ConstDeclNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitConstNode(ConstNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDAsgnNode(DAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDRegxNode(DRegexpNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDStrNode(DStrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDSymbolNode(DSymbolNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDVarNode(DVarNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDXStrNode(DXStrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDefinedNode(DefinedNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitDefnNode(DefnNode arg0) {
		methodName = arg0.getLexicalName();
		method = new Method(methodName, fileName, false);
		methods.add(method);
		storage.addMethodList(key, methods);

		cfg = new ControlFlowGraph();
		cfgNode = new CFGNode();
		cfg.getEntryNode().setClassName(className);
		cfg.getEntryNode().setMethodName(methodName);
		cfg.getEntryNode().setMvc(mvc);
		type="statement";
		code="";
		
		if(arg0.getBody()!=null)
			visit(arg0.getBody());
		return true;
	}

	@Override
	public Object visitDefsNode(DefsNode arg0) {
		
		methodName = arg0.getLexicalName();
		method = new Method(methodName, fileName, false);
		methods.add(method);
		storage.addMethodList(key, methods);
		
		cfg = new ControlFlowGraph();
		cfgNode = new CFGNode();
		cfg.getEntryNode().setClassName(className);
		cfg.getEntryNode().setMethodName(methodName);
		cfg.getEntryNode().setMvc(mvc);
		code="";
		type="statement";
		
		if(arg0.getBody()!=null)
			visit(arg0.getBody());
		return true;
	}

	@Override
	public Object visitDotNode(DotNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitEncodingNode(EncodingNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitEnsureNode(EnsureNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitEvStrNode(EvStrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitFCallNode(FCallNode arg0) {
		//System.out.print("Kelas "+className+"\nMethod: "+methodName+"\n"+"FcallNode: "+toCode(arg0)+"\n"+arg0.getLexicalName()+"\n");
		return null;
	}

	@Override
	public Object visitFalseNode(FalseNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitFixnumNode(FixnumNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitFlipNode(FlipNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitFloatNode(FloatNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitForNode(ForNode arg0) {

		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode = new CFGNode();
		type="for";
		/*String adderCode = toCode(arg0.getIter())+"\n";
		code+=adderCode;*/
		code =toCode(arg0.getIter());
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		if(arg0.getBody()!=null)
		{
			type="bodyfor";
			cfgNode = new CFGNode();
			code = "";
			visit(arg0.getBody());
			
			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}

		cfgNode = new CFGNode();
		code = "";
		/*cfgNode=new CFGNode();
		code="";
		nodeAST="";*/
		return true;
	}

	@Override
	public Object visitGlobalAsgnNode(GlobalAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitGlobalVarNode(GlobalVarNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitHashNode(HashNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitIfNode(IfNode arg0) {

		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode = new CFGNode();
		type="if";
		/*String adderCode = toCode(arg0.getCondition())+"\n";
		code+=adderCode;*/
		code = toCode(arg0.getCondition());
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		if(arg0.getThenBody()!=null)
		{
			type="then";
			if(arg0.getThenBody().getNodeType().equals(NodeType.BLOCKNODE))
			{
				cfgNode = new CFGNode();
				code = "";
				type="then";
				visit(arg0.getThenBody());
			}
			else
			{
				cfgNode = new CFGNode();
				type="then";
				code = toCode(arg0.getThenBody())+"\n";
				//visit(arg0.getThenBody());
			}
			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}
		if(arg0.getElseBody()!=null)
		{
			type="else";
			if(arg0.getElseBody().getNodeType().equals(NodeType.BLOCKNODE))
			{
				cfgNode = new CFGNode();
				code="";
				type="else";
				visit(arg0.getElseBody());
			}
			else
			{
				cfgNode = new CFGNode();
				type="else";
				code = toCode(arg0.getElseBody())+"\n";
			}
			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitImplicitNilNode(ImplicitNilNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitInstAsgnNode(InstAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitInstVarNode(InstVarNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitIterNode(IterNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitKeywordArgNode(KeywordArgNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitKeywordRestArgNode(KeywordRestArgNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitLambdaNode(LambdaNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitListNode(ListNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitLiteralNode(LiteralNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitLocalAsgnNode(LocalAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitLocalVarNode(LocalVarNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitMatch2Node(Match2Node arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitMatch3Node(Match3Node arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitMatchNode(MatchNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitMethodNameNode(MethodNameNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitModuleNode(ModuleNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitMultipleAsgnNode(MultipleAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitNewlineNode(NewlineNode arg0) {
		Node node = arg0.getNextNode();
		//jika node berupa statement/assignment//
		if(cfg!=null &&(node.getNodeType().equals(NodeType.ATTRASSIGNNODE)||node.getNodeType().equals(NodeType.BREAKNODE) ||
				node.getNodeType().equals(NodeType.CALLNODE) || node.getNodeType().equals(NodeType.CLASSVARASGNNODE)
						||node.getNodeType().equals(NodeType.DASGNNODE)||node.getNodeType().equals(NodeType.FCALLNODE)
						||node.getNodeType().equals(NodeType.GLOBALASGNNODE) || node.getNodeType().equals(NodeType.INSTASGNNODE)
						||node.getNodeType().equals(NodeType.LOCALASGNNODE)||node.getNodeType().equals(NodeType.MULTIPLEASGNNODE)
						||node.getNodeType().equals(NodeType.VCALLNODE)))
		{
			String adderCode;
			//jika node ada di dalam method
			if(node.getGrandParent().getNodeType().equals(NodeType.DEFNNODE)||node.getGrandParent().getNodeType().equals(NodeType.DEFSNODE))
			{
				if(node.getNodeType().equals(NodeType.CALLNODE)||node.getNodeType().equals(NodeType.FCALLNODE)||
						node.getNodeType().equals(NodeType.VCALLNODE))
				{
					//type="statement";
					adderCode = toCode(node)+"\n";
					code+=adderCode;
					visit(node);
				}
				else
				{
					//type="statement";
					adderCode = toCode(node)+"\n";
					code+=adderCode;
				}
			}
			//jika node ada di dalam method//
			else if(node.getGrandParent().getNodeType().equals(NodeType.BLOCKNODE))
			{
				
				if(node.getGrandParent().getParent().getNodeType().equals(NodeType.DEFNNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.DEFSNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.IFNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.FORNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.WHILENODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.WHENNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.UNTILNODE))
				{

					//System.out.println("node block: "+toCode(node));
					if(node.getNodeType().equals(NodeType.BREAKNODE)||node.getNodeType().equals(NodeType.RETURNNODE)||
							node.getNodeType().equals(NodeType.NEXTNODE)||node.getNodeType().equals(NodeType.RETRYNODE)
							||node.getNodeType().equals(NodeType.REDONODE))
						visit(node);
					else if(node.getNodeType().equals(NodeType.CALLNODE)||node.getNodeType().equals(NodeType.FCALLNODE)||
							node.getNodeType().equals(NodeType.VCALLNODE))
					{
						adderCode = toCode(node)+"\n";
						code+=adderCode;
						visit(node);
					}
					else
					{
						adderCode = toCode(node)+"\n";
						code+=adderCode;
					}

					if(node.getGrandParent().getParent().getNodeType().equals(NodeType.IFNODE)
							&& node.getGrandParent().getParent().getClosestIScope().equals(node.getClosestIScope())
							|| node.getClosestIScope().toString().startsWith("(If"))
					{
						if(type=="then")type="then";
						else
							type="else";
					}
					else if((node.getGrandParent().getParent().getNodeType().equals(NodeType.FORNODE)
							&& node.getGrandParent().getParent().getClosestIScope().equals(node.getClosestIScope()))
							||node.getClosestIScope().toString().startsWith("(For"))
					{
						type="bodyfor";
					}
					else if(node.getGrandParent().getParent().getNodeType().equals(NodeType.WHILENODE)
							&& node.getGrandParent().getParent().getClosestIScope().equals(node.getClosestIScope())
							||node.getClosestIScope().toString().startsWith("(While"))
					{
						type="bodywhile";
					}
					else if(node.getGrandParent().getParent().getNodeType().equals(NodeType.UNTILNODE)
							&& node.getGrandParent().getParent().getClosestIScope().equals(node.getClosestIScope())
							||node.getClosestIScope().toString().startsWith("(Until"))
					{
						type="bodyuntil";
					}
					else if(node.getGrandParent().getParent().getNodeType().equals(NodeType.WHENNODE)
							&& node.getGrandParent().getParent().getClosestIScope().equals(node.getClosestIScope())
							||node.getClosestIScope().toString().startsWith("(When"))
					{
						type="when";
						System.out.println("node di when: "+toCode(node));
					}
					else if(type=="elsecase")
					{
						type="elsecase";
					}
					else type="statement";

					//System.out.println("lalala: "+toCode(node)+"\n"+node.getGrandParent().getClosestIScope()+"\n"+type);
				}
			}
			else if(node.getGrandParent().getNodeType().equals(NodeType.WHENNODE))
			{
					adderCode = toCode(node)+"\n";
					code+=adderCode;
			}

			else if(node.getNodeType().equals(NodeType.CALLNODE)||node.getNodeType().equals(NodeType.FCALLNODE)||
					node.getNodeType().equals(NodeType.VCALLNODE))
			{
				adderCode = toCode(node)+"\n";
				code+=adderCode;
				visit(node);
			}
		}
		else if(cfg!=null && node.getNodeType().equals(NodeType.IFNODE)||node.getNodeType().equals(NodeType.FORNODE)||
				node.getNodeType().equals(NodeType.WHILENODE)||node.getNodeType().equals(NodeType.CASENODE)||
				node.getNodeType().equals(NodeType.UNTILNODE)||node.getNodeType().equals(NodeType.BREAKNODE))
		{
			visit(node);
			//System.out.println("node control: "+toCode(node));
		}
		else visit(node);

		if(node.getNodeType().equals(NodeType.DEFNNODE)||node.getNodeType().equals(NodeType.DEFSNODE))
		{
			if(cfg!=null)
			{
				if(code!="")
				{
				cfgNode.setClassName(className);
				cfgNode.setMethodName(methodName);
				cfgNode.setMvc(mvc);
				cfgNode.setCode(code);
				cfgNode.setType(type);
				setIncomingNodes(cfgNode);
				cfg.addCFGNode(cfgNode);
				}
				type="exit";
				cfgNode = new CFGNode();
				cfgNode.setClassName(className);
				cfgNode.setMethodName(methodName);
				cfgNode.setMvc(mvc);
				cfgNode.setCode("Exit");
				cfgNode.setType(type);
				setIncomingNodes(cfgNode);
				cfg.addCFGNode(cfgNode);
				storage.addCfgFile(key+";"+methodName, cfg);
			}
		}
		/*if(cfg!=null)
		{
			String adderCode;
			if(node.getGrandParent().getNodeType().equals(NodeType.DEFNNODE)||node.getGrandParent().getNodeType().equals(NodeType.DEFSNODE))
			{
				if(node.getNodeType().equals(NodeType.ATTRASSIGNNODE)||node.getNodeType().equals(NodeType.BREAKNODE) ||
				node.getNodeType().equals(NodeType.CLASSVARASGNNODE)||node.getNodeType().equals(NodeType.DASGNNODE)||
				node.getNodeType().equals(NodeType.GLOBALASGNNODE) || node.getNodeType().equals(NodeType.INSTASGNNODE)||
				node.getNodeType().equals(NodeType.LOCALASGNNODE)||node.getNodeType().equals(NodeType.MULTIPLEASGNNODE))
				{
					adderCode = toCode(node)+"\n";
					code+=adderCode;
				}
				else if(node.getNodeType().equals(NodeType.CALLNODE)||node.getNodeType().equals(NodeType.FCALLNODE)||
						node.getNodeType().equals(NodeType.VCALLNODE))
				{
					type="statement";
					adderCode = toCode(node)+"\n";
					code+=adderCode;
					visit(node);
				}
				else if(node.getNodeType().equals(NodeType.IFNODE)||node.getNodeType().equals(NodeType.FORNODE)||
				node.getNodeType().equals(NodeType.WHILENODE)||node.getNodeType().equals(NodeType.CASENODE)||
				node.getNodeType().equals(NodeType.UNTILNODE)||node.getNodeType().equals(NodeType.BREAKNODE))
				{
					visit(node);
				}
			}
			else if(node.getGrandParent().getNodeType().equals(NodeType.BLOCKNODE))
			{
				if(node.getGrandParent().getParent().getNodeType().equals(NodeType.DEFNNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.DEFSNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.IFNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.FORNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.WHILENODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.WHENNODE)||
						node.getGrandParent().getParent().getNodeType().equals(NodeType.UNTILNODE))
				{
					if(node.getNodeType().equals(NodeType.ATTRASSIGNNODE)||node.getNodeType().equals(NodeType.BREAKNODE) ||
							node.getNodeType().equals(NodeType.CLASSVARASGNNODE)||node.getNodeType().equals(NodeType.DASGNNODE)||
							node.getNodeType().equals(NodeType.GLOBALASGNNODE) || node.getNodeType().equals(NodeType.INSTASGNNODE)||
							node.getNodeType().equals(NodeType.LOCALASGNNODE)||node.getNodeType().equals(NodeType.MULTIPLEASGNNODE))
							{
								adderCode = toCode(node)+"\n";
								code+=adderCode;
							}
					else if(node.getNodeType().equals(NodeType.BREAKNODE)||node.getNodeType().equals(NodeType.RETURNNODE)||
							node.getNodeType().equals(NodeType.NEXTNODE)||node.getNodeType().equals(NodeType.RETRYNODE)
							||node.getNodeType().equals(NodeType.REDONODE))
						visit(node);
					else if(node.getNodeType().equals(NodeType.CALLNODE)||node.getNodeType().equals(NodeType.FCALLNODE)||
							node.getNodeType().equals(NodeType.VCALLNODE))
					{
						adderCode = toCode(node)+"\n";
						code+=adderCode;
						visit(node);
					}
					else
					{
						adderCode = toCode(node)+"\n";
						code+=adderCode;
					}
				}
			}
			if(node.getNodeType().equals(NodeType.DEFNNODE)||node.getNodeType().equals(NodeType.DEFSNODE))
			{
				if(code!="")
				{
					cfgNode.setClassName(className);
					cfgNode.setMethodName(methodName);
					cfgNode.setMvc(mvc);
					cfgNode.setCode(code);
					cfgNode.setType(type);
					setIncomingNodes(cfgNode);
					cfg.addCFGNode(cfgNode);
				}
				type="exit";
				cfgNode = new CFGNode();
				cfgNode.setClassName(className);
				cfgNode.setMethodName(methodName);
				cfgNode.setMvc(mvc);
				cfgNode.setCode("Exit");
				cfgNode.setType(type);
				setIncomingNodes(cfgNode);
				cfg.addCFGNode(cfgNode);
				storage.addCfgFile(key+";"+methodName, cfg);
			}
		}*/
		return true;
	}

	@Override
	public Object visitNextNode(NextNode arg0) {
		String adderCode;
		adderCode = toCode(arg0)+"\n";
		code+=adderCode;
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitNilNode(NilNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitNotNode(NotNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitNthRefNode(NthRefNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOpAsgnAndNode(OpAsgnAndNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOpAsgnNode(OpAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOpAsgnOrNode(OpAsgnOrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOpElementAsgnNode(OpElementAsgnNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOptArgNode(OptArgNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitOrNode(OrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitPostExeNode(PostExeNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitPreExeNode(PreExeNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitRedoNode(RedoNode arg0) {
		String adderCode;
		adderCode = toCode(arg0)+"\n";
		code+=adderCode;
		//type="redo";
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitRegexpNode(RegexpNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitRescueBodyNode(RescueBodyNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitRescueNode(RescueNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitRestArgNode(RestArgNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitRetryNode(RetryNode arg0) {
		String adderCode;
		adderCode = toCode(arg0)+"\n";
		code+=adderCode;
		//type="retry";
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitReturnNode(ReturnNode arg0) {
		String adderCode;
		adderCode = toCode(arg0)+"\n";
		code+=adderCode;
		//type="return";
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitRootNode(RootNode arg0) {
		if(arg0!=null)
		visit(arg0.getBody());
		return null;
	}

	@Override
	public Object visitSClassNode(SClassNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSValueNode(SValueNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSelfNode(SelfNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSplatNode(SplatNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitStrNode(StrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSuperNode(SuperNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSymbolNode(SymbolNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitSyntaxNode(SyntaxNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitToAryNode(ToAryNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitTrueNode(TrueNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitUnaryCallNode(UnaryCallNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitUndefNode(UndefNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitUntilNode(UntilNode arg0) {

		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode = new CFGNode();
		type="until";
		/*String adderCode = toCode(arg0.getCondition())+"\n";
		code+=adderCode;*/
		code = toCode(arg0.getCondition());
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		if(arg0.getBody()!=null)
		{
			type="bodyuntil";
			cfgNode = new CFGNode();
			code="";
			visit(arg0.getBody());

			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitVAliasNode(VAliasNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitVCallNode(VCallNode arg0) {
		//System.out.print("Kelas "+className+"\nMethod: "+methodName+"\n"+"VcallNode: "+toCode(arg0)+"\n"+arg0.getLexicalName()+"\n");
		return null;
	}

	@Override
	public Object visitWhenNode(WhenNode arg0) {
		if(arg0!=null)
		{
			code="";
			type="when";
			visit(arg0.getExpression());
			code=toCode(arg0.getExpression())+"\n";
			visit(arg0.getBody());
			cfgNode = new CFGNode();
			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}
		return true;
	}

	@Override
	public Object visitWhileNode(WhileNode arg0) {
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		
		cfgNode = new CFGNode();
		type="while";
		/*String adderCode = toCode(arg0.getCondition())+"\n";
		code+=adderCode;*/
		code = toCode(arg0.getCondition());
		cfgNode.setClassName(className);
		cfgNode.setMethodName(methodName);
		cfgNode.setMvc(mvc);
		cfgNode.setCode(code);
		cfgNode.setType(type);
		setIncomingNodes(cfgNode);
		cfg.addCFGNode(cfgNode);
		if(arg0.getBody()!=null)
		{
			type="bodywhile";
			cfgNode = new CFGNode();
			code = "";
			visit(arg0.getBody());			

			cfgNode.setClassName(className);
			cfgNode.setMethodName(methodName);
			cfgNode.setMvc(mvc);
			cfgNode.setCode(code);
			cfgNode.setType(type);
			setIncomingNodes(cfgNode);
			cfg.addCFGNode(cfgNode);
		}
		cfgNode=new CFGNode();
		code="";
		return true;
	}

	@Override
	public Object visitXStrNode(XStrNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitYieldNode(YieldNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitZArrayNode(ZArrayNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Object visitZSuperNode(ZSuperNode arg0) {
		// TODO Auto-generated method stub
		return null;
	}

}
